<?php

namespace app\home\controller;

use app\base\BaseController;
use app\load\loadServices\TypeServices;
use think\Exception;

/**
 * 类型
 */
class CommentType extends BaseController
{

    /**
     * 获取审核类型
     * @return mixed
     */
    public function flow_type_list()
    {

        $input = input();
        try {
            $where['status'] = 1;
            if (!empty($input['type'])) {
                $where['type'] = $input['type'];
            }
            $result = TypeServices::FlowType()->list($where, '*');
            return to_assign(0, '', $result);
        } catch (Exception $e) {
            return to_assign(1, $e->getMessage());
        }
    }


    /**
     * 获取服务类型
     * @return mixed
     */
    public function services_type_list()
    {
        $result = TypeServices::Services()->list();
        return to_assign(0, '', $result);
    }

    /**
     * 获取工作类型列表
     * @return mixed
     */
    public function work_type_list()
    {
        $cate = get_work_cate();
        return to_assign(0, '', $cate);
    }


}